package com.mi.queryhivedemo.controller;


import com.mi.queryhivedemo.dao.TestDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class TestController {

    @Autowired
    TestDao testDao;

    @Value("${sqltest}")
    String Sql;

    @RequestMapping("/test")
    @ResponseBody
    public String test1(@RequestParam String sql){
        return testDao.test(Sql);
    }
}
